/*
 * Opponent.cpp
 *
 *  Created on: 31.10.2013
 *      Author: dima
 */

#include "OpponentModel.hpp"
#include "Types.hpp"

#include <string>


Tanks::
Model::
OpponentModel::
OpponentModel(int argX,
        int argY,
        int argW,
        int argH,
        Tanks::Model::Difficulty argDifficulty)
{
  switch(argDifficulty)
  {
  case Easy:
    m_health = 200;
    m_damage = 50;
    m_fireRate = 3.0;
    m_missileSpeed = 10;
    m_speed = 1;
    m_type = TankEasy;
    break;
  case Medium:
    m_health = 400;
    m_damage = 75;
    m_fireRate = 2.0;
    m_missileSpeed = 12;
    m_speed = 2;
    m_type = TankMedium;
    break;
  case Hard:
    m_health = 600;
    m_damage = 125;
    m_fireRate = 1.0;
    m_missileSpeed = 12;
    m_speed = 3;
    m_type = TankHard;
    break;
  default:
    throw std::string("Invalid opponent tank");
    break;
  }
  m_rect = new SDL_Rect;
  m_rect->x = argX;
  m_rect->y = argY;
  m_rect->w = argW;
  m_rect->h = argH;

  m_oldX = argX;
  m_oldY = argY;

  m_team = 1;
}


